<template>
  <div class="home">
    <el-card>
      <div class="box">
        <img class="avatar" :src="userStore.avatar" />
        <div class="bottom">
          <h3 class="title"> {{ getTime()}}好,{{ userStore.username }}</h3>
          <p class="sub-name">后台管理平台</p>
        </div>
      </div>
    </el-card>
    <div class="svg-box">
      <svgIcon name="welcome" width="600px" height="300px"></svgIcon>
    </div>
    
  </div>
</template>

<script setup lang="ts">
import { useUserStore } from '@/store/modules/user';
import { getTime } from '@/utils/time';
const userStore = useUserStore()

</script>

<style lang="scss" scoped>
  .home {
    .box {
      display: flex;
      align-items: center;
      .avatar {
        width: 100px;
        height: 100px;
        border-radius: 100%;
        margin-right: 20px;
      }
      .title {
        font-size: 20px;
        margin-bottom: 20px;
        font-weight: 900;
      }
      .sub-name {
        font-style: italic;
        color: skyblue;
      }
    }
    .svg-box {
      margin-top: 20px;
      display: flex;
      justify-content: center;
    }
  }
</style>
